//
//  HomeAnnounceCell.m
//  YunGou
//
//  Created by macbook on 16/6/6.
//  Copyright © 2016年 macbook. All rights reserved.
//

#import "HomeAnnounceCell.h"
@interface HomeAnnounceCell ()

@end

@implementation HomeAnnounceCell

- (void)awakeFromNib {
    _firstImage.layer.cornerRadius = _firstImage.frame.size.width/2;
    _firstImage.clipsToBounds = YES;
    
    _thirdImage.layer.cornerRadius = _thirdImage.frame.size.width/2;
    _thirdImage.clipsToBounds = YES;
    
    _secondImage.layer.cornerRadius = _secondImage.frame.size.width/2;
    _secondImage.clipsToBounds = YES;
    
    UITapGestureRecognizer *tap1 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)];
    UITapGestureRecognizer *tap2 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)];
    UITapGestureRecognizer *tap3 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)];
    [_firstView addGestureRecognizer:tap1];
    [_secondView addGestureRecognizer:tap2];
    [_thirdView addGestureRecognizer:tap3];
}

- (void)handleTap:(UITapGestureRecognizer *)tap{
    if (self.announceBlock) {
        self.announceBlock(tap.view.tag);
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
